@karlorz/codexhost-cli-win32-x64 0.16.1-2 → 0.17.0-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/THIRD_PARTY_NOTICES.txt +6 -2
  3. package/app/codexhost-distribution.json +1 -1
  4. package/app/console-server.mjs +86 -20
  5. package/app/console-web.js +76 -17
  6. package/app/cpa-live-voice-hook.js +62 -8
  7. package/app/desktop-controller.mjs +107 -31
  8. package/app/host-runtime.mjs +2560 -1634
  9. package/app/plugins/antigravity/plugin.mjs +66 -2
  10. package/app/plugins/claude-code/plugin.mjs +43 -6
  11. package/app/plugins/codebuddy/plugin.mjs +41 -0
  12. package/app/plugins/codex-usage/plugin.mjs +31 -0
  13. package/app/plugins/copilot/plugin.mjs +31 -0
  14. package/app/plugins/cursor-cli/plugin.mjs +40 -5
  15. package/app/plugins/deepseek-harness/plugin.mjs +490 -46
  16. package/app/plugins/devin/assets/icon.svg +1 -0
  17. package/app/plugins/devin/manifest.json +30 -0
  18. package/app/plugins/devin/plugin.mjs +23536 -0
  19. package/app/plugins/enabled.json +2 -0
  20. package/app/plugins/grok/plugin.mjs +1615 -495
  21. package/app/plugins/hermes/plugin.mjs +484 -196
  22. package/app/plugins/kimi-code/plugin.mjs +31 -0
  23. package/app/plugins/kiro-cli/plugin.mjs +31 -0
  24. package/app/plugins/omp/plugin.mjs +31 -0
  25. package/app/plugins/opencode/plugin.mjs +31 -0
  26. package/app/plugins/pi/plugin.mjs +1491 -411
  27. package/app/plugins/qoder/plugin.mjs +9555 -8654
  28. package/app/plugins/qoder-cn/plugin.mjs +9555 -8654
  29. package/app/plugins/qwen-code/assets/icon.svg +1 -0
  30. package/app/plugins/qwen-code/manifest.json +29 -0
  31. package/app/plugins/qwen-code/plugin.mjs +29471 -0
  32. package/app/plugins/workbuddy/plugin.mjs +41 -0
  33. package/app/plugins/zcode/plugin.mjs +31 -0
  34. package/app/renderer-extension.js +966 -233
  35. package/bin/codexhost.exe +0 -0
  36. package/libexec/codexhost-node-repl.exe +0 -0
  37. package/libexec/codexhost-shim.exe +0 -0
  38. package/libexec/codexhost-updater.exe +0 -0
  39. package/licenses/Qwen-Code-SDK-LICENSE.txt +203 -0
  40. package/package.json +2 -2
package/README.md CHANGED
@@ -7,7 +7,7 @@ Run Pi and Claude Code as first-class external harnesses inside Codex Desktop.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install -g @karlorz/codexhost-cli@0.16.1-2
10
+ npm install -g @karlorz/codexhost-cli@0.17.0-0
11
11
  ```
12
12
 
13
13
  Do not install this package directly. npm selects it through the optional dependencies of `@karlorz/codexhost-cli`.
@@ -36,7 +36,7 @@ The `codexhost` command launches the packaged Rust launcher with:
36
36
 
37
37
  ## Requirements
38
38
 
39
- - Node.js 22 or 24 (Node 20 and older are not supported)
39
+ - Node.js 22.19.0 or later, except 23.x (other releases lack parts of the built-in `node:sqlite` module)
40
40
  - Official ChatGPT/Codex Desktop for macOS, Windows, or Linux
41
41
  - Pi on `PATH` when using the Pi agent
42
42
  - Claude Code installed when using the Claude Code adapter
@@ -32,14 +32,18 @@ License text: licenses/OpenCode-v2-Client-LICENSE.txt
32
32
  License: MIT
33
33
  License text: licenses/OpenCode-SDK-LICENSE.txt
34
34
 
35
- @qoder-ai/qoder-agent-sdk 1.0.39
35
+ @qoder-ai/qoder-agent-sdk 1.0.58
36
36
  License: SEE LICENSE IN LICENSE
37
37
  License text: licenses/Qoder-Agent-SDK-LICENSE.txt
38
38
 
39
- @qodercn-ai/qodercn-agent-sdk 1.0.39
39
+ @qodercn-ai/qodercn-agent-sdk 1.0.58
40
40
  License: SEE LICENSE IN LICENSE
41
41
  License text: licenses/QoderCN-Agent-SDK-LICENSE.txt
42
42
 
43
+ @qwen-code/sdk 0.1.26
44
+ License: Apache-2.0
45
+ License text: licenses/Qwen-Code-SDK-LICENSE.txt
46
+
43
47
  diff 8.0.2
44
48
  License: BSD-3-Clause
45
49
  License text: licenses/diff-LICENSE.txt
@@ -1 +1 @@
1
- {"schemaVersion":1,"version":"0.16.1-2","distribution":"npm","target":"windows-x64"}
1
+ {"schemaVersion":1,"version":"0.17.0-0","distribution":"npm","target":"windows-x64"}
@@ -17030,6 +17030,37 @@ var voiceSettingsStateSchema = external_exports.strictObject({
17030
17030
  })
17031
17031
  });
17032
17032
 
17033
+ // packages/shared-contracts/dist/background-activity.js
17034
+ var backgroundActivitySchema = external_exports.strictObject({
17035
+ id: external_exports.string().min(1),
17036
+ kind: external_exports.enum(["task", "monitor", "loop", "subagent"]),
17037
+ label: external_exports.string(),
17038
+ status: external_exports.enum(["running", "scheduled", "completed", "failed", "cancelled", "unknown"]),
17039
+ canStop: external_exports.boolean(),
17040
+ /** Existing detached command Item presented by Desktop's native process UI. */
17041
+ commandItemId: hostItemIdSchema.optional(),
17042
+ schedule: external_exports.string().optional(),
17043
+ nextRunAt: external_exports.string().datetime({ offset: true }).optional(),
17044
+ relatedActivityId: external_exports.string().optional(),
17045
+ threadId: hostThreadIdSchema.optional()
17046
+ });
17047
+ var backgroundActivityDetailSchema = external_exports.strictObject({
17048
+ activity: backgroundActivitySchema,
17049
+ output: external_exports.string(),
17050
+ truncated: external_exports.boolean()
17051
+ });
17052
+ var threadActivityParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
17053
+ var threadActivityItemParamsSchema = threadActivityParamsSchema.extend({
17054
+ activityId: external_exports.string().min(1)
17055
+ });
17056
+ var threadActivityListResultSchema = external_exports.strictObject({
17057
+ supported: external_exports.boolean(),
17058
+ activities: external_exports.array(backgroundActivitySchema)
17059
+ });
17060
+ var threadActivityStopResultSchema = external_exports.strictObject({
17061
+ outcome: external_exports.enum(["stopped", "alreadyStopped", "notFound"])
17062
+ });
17063
+
17033
17064
  // packages/shared-contracts/dist/index.js
17034
17065
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
17035
17066
 
@@ -17172,33 +17203,58 @@ var HarnessLaunchSettingsStore = class {
17172
17203
  return path8.join(this.#directory, `${harnessPluginIdSchema.parse(id)}.json`);
17173
17204
  }
17174
17205
  async #read(id) {
17206
+ const file2 = this.#file(id);
17207
+ let text;
17175
17208
  try {
17176
- const value = harnessLaunchPathSchema.parse(JSON.parse(await readFile4(this.#file(id), "utf8")));
17177
- if (!path8.isAbsolute(value))
17178
- throw new Error("Expected an absolute entrypoint path");
17179
- return value;
17209
+ text = await readFile4(file2, "utf8");
17180
17210
  } catch (error51) {
17181
17211
  if (error51 && typeof error51 === "object" && "code" in error51 && error51.code === "ENOENT")
17182
17212
  return null;
17183
- throw new Error("Could not read Harness launch settings");
17213
+ throw new Error(`Could not read Harness launch settings at ${file2}`, { cause: error51 });
17214
+ }
17215
+ let parsed;
17216
+ try {
17217
+ parsed = harnessLaunchPathSchema.parse(JSON.parse(text));
17218
+ } catch {
17219
+ }
17220
+ if (parsed === void 0 || !path8.isAbsolute(parsed)) {
17221
+ throw new Error(`Could not read Harness launch settings at ${file2}: expected an absolute installation path; save a new path or reset it`);
17184
17222
  }
17223
+ return parsed;
17185
17224
  }
17186
- /** Capture the value used to construct this Host's Adapter; changes require a restart. */
17187
- async initialCommand(id) {
17225
+ #snapshot(id) {
17188
17226
  let initial = this.#initial.get(id);
17189
17227
  if (!initial) {
17190
- initial = this.#read(id);
17228
+ initial = this.#read(id).then((value) => ({ path: value }), (error51) => ({ error: error51 instanceof Error ? error51 : new Error(String(error51)) }));
17191
17229
  this.#initial.set(id, initial);
17192
17230
  }
17193
- return await initial ?? void 0;
17231
+ return initial;
17232
+ }
17233
+ /**
17234
+ * Capture the value used to construct this Host's Adapter; changes require a restart. A failed
17235
+ * read is remembered for restart reporting but not reused: the next call reads the file again.
17236
+ */
17237
+ async initialCommand(id) {
17238
+ const cached2 = this.#initial.get(id);
17239
+ if (cached2 && "error" in await cached2)
17240
+ this.#initial.delete(id);
17241
+ const snapshot = await this.#snapshot(id);
17242
+ if ("error" in snapshot)
17243
+ throw snapshot.error;
17244
+ return snapshot.path ?? void 0;
17245
+ }
17246
+ /** The Adapter was built without a readable setting, so any saved value needs a restart. */
17247
+ #restartRequired(snapshot, value) {
17248
+ return "error" in snapshot || value !== snapshot.path;
17194
17249
  }
17195
17250
  async get(id) {
17196
- const initial = await this.initialCommand(id) ?? null;
17251
+ const snapshot = await this.#snapshot(id);
17197
17252
  const value = await this.#read(id);
17198
- return { path: value, restartRequired: value !== initial };
17253
+ return { path: value, restartRequired: this.#restartRequired(snapshot, value) };
17199
17254
  }
17255
+ /** Replaces the file without reading it, so an unreadable file can always be repaired. */
17200
17256
  async set(id, value) {
17201
- const initial = await this.initialCommand(id) ?? null;
17257
+ const snapshot = await this.#snapshot(id);
17202
17258
  const file2 = this.#file(id);
17203
17259
  if (value === null) {
17204
17260
  await rm3(file2, { force: true });
@@ -17219,7 +17275,7 @@ var HarnessLaunchSettingsStore = class {
17219
17275
  await rm3(temporary, { force: true });
17220
17276
  }
17221
17277
  }
17222
- return { path: value, restartRequired: value !== initial };
17278
+ return { path: value, restartRequired: this.#restartRequired(snapshot, value) };
17223
17279
  }
17224
17280
  };
17225
17281
 
@@ -17622,10 +17678,15 @@ function createConsoleHarnesses(roots, environment = process.env) {
17622
17678
  if (seen.has(manifest.id)) continue;
17623
17679
  seen.add(manifest.id);
17624
17680
  const icon = manifest.icon ? await readPluginIcon(plugin.root, manifest.icon).catch(() => null) : null;
17625
- const launchPath = manifest.launchCommand ? await store.get(manifest.id).then(
17626
- (settings) => settings.path,
17627
- () => null
17628
- ) : null;
17681
+ let launchPath = null;
17682
+ let launchPathError = null;
17683
+ if (manifest.launchCommand) {
17684
+ try {
17685
+ launchPath = (await store.get(manifest.id)).path;
17686
+ } catch (error51) {
17687
+ launchPathError = error51 instanceof Error ? error51.message : String(error51);
17688
+ }
17689
+ }
17629
17690
  harnesses.push({
17630
17691
  id: manifest.id,
17631
17692
  name: manifest.name,
@@ -17635,7 +17696,8 @@ function createConsoleHarnesses(roots, environment = process.env) {
17635
17696
  links: manifest.links ?? null,
17636
17697
  icon,
17637
17698
  launchPath,
17638
- ...manifest.id === "grok" ? { computerUse: await getGrokComputerUseSettings(environment) } : {}
17699
+ ...manifest.id === "grok" ? { computerUse: await getGrokComputerUseSettings(environment) } : {},
17700
+ launchPathError
17639
17701
  });
17640
17702
  }
17641
17703
  return harnesses.sort(
@@ -17652,7 +17714,7 @@ function createConsoleHarnesses(roots, environment = process.env) {
17652
17714
  }
17653
17715
  try {
17654
17716
  const settings = await store.set(id, value);
17655
- return { ...harness2, launchPath: settings.path };
17717
+ return { ...harness2, launchPath: settings.path, launchPathError: null };
17656
17718
  } catch (error51) {
17657
17719
  throw new ConsoleHarnessError(400, error51 instanceof Error ? error51.message : String(error51));
17658
17720
  }
@@ -18812,7 +18874,11 @@ function startConsoleServer(options) {
18812
18874
  return;
18813
18875
  }
18814
18876
  scheduleIdleExit();
18815
- const url2 = new URL(request.url ?? "/", `http://127.0.0.1:${port}`);
18877
+ const url2 = URL.parse(request.url ?? "/", `http://127.0.0.1:${port}`);
18878
+ if (!url2) {
18879
+ sendJson(response, 400, { error: "Bad Request" });
18880
+ return;
18881
+ }
18816
18882
  const method = request.method ?? "GET";
18817
18883
  let route = `${method} ${url2.pathname}`;
18818
18884
  if (route === "GET /api/health") {
@@ -16261,6 +16261,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16261
16261
  })
16262
16262
  });
16263
16263
 
16264
+ // ../shared-contracts/dist/background-activity.js
16265
+ var backgroundActivitySchema = external_exports.strictObject({
16266
+ id: external_exports.string().min(1),
16267
+ kind: external_exports.enum(["task", "monitor", "loop", "subagent"]),
16268
+ label: external_exports.string(),
16269
+ status: external_exports.enum(["running", "scheduled", "completed", "failed", "cancelled", "unknown"]),
16270
+ canStop: external_exports.boolean(),
16271
+ /** Existing detached command Item presented by Desktop's native process UI. */
16272
+ commandItemId: hostItemIdSchema.optional(),
16273
+ schedule: external_exports.string().optional(),
16274
+ nextRunAt: external_exports.string().datetime({ offset: true }).optional(),
16275
+ relatedActivityId: external_exports.string().optional(),
16276
+ threadId: hostThreadIdSchema.optional()
16277
+ });
16278
+ var backgroundActivityDetailSchema = external_exports.strictObject({
16279
+ activity: backgroundActivitySchema,
16280
+ output: external_exports.string(),
16281
+ truncated: external_exports.boolean()
16282
+ });
16283
+ var threadActivityParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
16284
+ var threadActivityItemParamsSchema = threadActivityParamsSchema.extend({
16285
+ activityId: external_exports.string().min(1)
16286
+ });
16287
+ var threadActivityListResultSchema = external_exports.strictObject({
16288
+ supported: external_exports.boolean(),
16289
+ activities: external_exports.array(backgroundActivitySchema)
16290
+ });
16291
+ var threadActivityStopResultSchema = external_exports.strictObject({
16292
+ outcome: external_exports.enum(["stopped", "alreadyStopped", "notFound"])
16293
+ });
16294
+
16264
16295
  // ../shared-contracts/dist/index.js
16265
16296
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
16266
16297
 
@@ -18969,13 +19000,12 @@ th[aria-sort] .console-usage-sort__mark {
18969
19000
  { className: "console-harness__path" },
18970
19001
  input,
18971
19002
  button(document2, messages.save, () => submit(input.value.trim() || null)),
18972
- harness2.launchPath ? button(document2, messages.useAutomatic, () => submit(null)) : null
19003
+ harness2.launchPath || harness2.launchPathError ? button(document2, messages.useAutomatic, () => submit(null)) : null
18973
19004
  )
18974
19005
  );
18975
- if (status.has(harness2.id)) {
18976
- row.append(
18977
- h(document2, "div", { className: "console-muted" }, status.get(harness2.id) ?? "")
18978
- );
19006
+ const message2 = status.get(harness2.id) ?? harness2.launchPathError;
19007
+ if (message2) {
19008
+ row.append(h(document2, "div", { className: "console-muted" }, message2));
18979
19009
  }
18980
19010
  }
18981
19011
  if (harness2.computerUse) {
@@ -21861,7 +21891,7 @@ th[aria-sort] .console-usage-sort__mark {
21861
21891
  launchPathAutomatic: "No saved override. Uses environment configuration, then automatic discovery.",
21862
21892
  launchPathSaving: "Saving\u2026",
21863
21893
  launchPathLoading: "Loading launch settings\u2026",
21864
- launchPathLoadError: "Could not load launch settings. Reopen this detail panel to retry.",
21894
+ launchPathLoadError: "Could not load launch settings. Save an installation directory or reset to automatic discovery to replace them.",
21865
21895
  launchPathSaveError: "Could not save. Enter an existing absolute installation folder on this Host and check configuration permissions.",
21866
21896
  grokComputerUseLabel: "Grok Computer Use",
21867
21897
  grokComputerUseTitle: "Computer Use",
@@ -22169,7 +22199,7 @@ th[aria-sort] .console-usage-sort__mark {
22169
22199
  launchPathAutomatic: "\u672A\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u8DEF\u5F84\uFF0C\u4F7F\u7528\u73AF\u5883\u53D8\u91CF\u914D\u7F6E\u6216\u81EA\u52A8\u53D1\u73B0\u3002",
22170
22200
  launchPathSaving: "\u6B63\u5728\u4FDD\u5B58\u2026",
22171
22201
  launchPathLoading: "\u6B63\u5728\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\u2026",
22172
- launchPathLoadError: "\u65E0\u6CD5\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u6B64\u8BE6\u60C5\u9762\u677F\u91CD\u8BD5\u3002",
22202
+ launchPathLoadError: "\u65E0\u6CD5\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\u3002\u4FDD\u5B58\u5B89\u88C5\u76EE\u5F55\u6216\u6062\u590D\u81EA\u52A8\u53D1\u73B0\u5373\u53EF\u66FF\u6362\u3002",
22173
22203
  launchPathSaveError: "\u4FDD\u5B58\u5931\u8D25\u3002\u8BF7\u586B\u5199\u6B64 Host \u4E0A\u5B9E\u9645\u5B58\u5728\u7684\u5B89\u88C5\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5E76\u786E\u8BA4\u914D\u7F6E\u76EE\u5F55\u53EF\u5199\u3002",
22174
22204
  grokComputerUseLabel: "Grok Computer Use",
22175
22205
  grokComputerUseTitle: "Computer Use",
@@ -24833,7 +24863,7 @@ ${detail}` : ""}`
24833
24863
  "codexhost was not detected over SSH. Install it on the remote computer or add it to the login shell PATH, then retry": "\u901A\u8FC7 SSH \u672A\u68C0\u6D4B\u5230 codexhost\u3002\u8BF7\u5728\u8FDC\u7A0B\u7535\u8111\u4E0A\u5B89\u88C5\uFF0C\u6216\u5C06\u5DF2\u5B89\u88C5\u7684 codexhost \u52A0\u5165\u767B\u5F55 shell \u7684 PATH \u540E\u91CD\u8BD5",
24834
24864
  "The active codexhost does not match the global npm installation. Uninstall only the remote service, or remove the package manually on the remote computer": "\u5F53\u524D codexhost \u4E0E npm \u5168\u5C40\u5B89\u88C5\u4F4D\u7F6E\u4E0D\u5339\u914D\u3002\u8BF7\u9009\u62E9\u4EC5\u5378\u8F7D\u8FDC\u7A0B\u670D\u52A1\uFF0C\u6216\u5728\u8FDC\u7A0B\u7535\u8111\u4E0A\u624B\u52A8\u5378\u8F7D\u8F6F\u4EF6\u5305",
24835
24865
  "The remote service was uninstalled, but removing the codexhost package failed. Check npm permissions on the remote computer and retry": "\u8FDC\u7A0B\u670D\u52A1\u5DF2\u5378\u8F7D\uFF0C\u4F46 codexhost \u8F6F\u4EF6\u5305\u5378\u8F7D\u5931\u8D25\u3002\u8BF7\u68C0\u67E5\u8FDC\u7A0B\u7535\u8111\u4E0A\u7684 npm \u6743\u9650\u540E\u91CD\u8BD5",
24836
- "Remote Node.js is unsupported. Select Node.js 22.19 or later in the 22.x series, or Node.js 24.x": "\u8FDC\u7A0B Node.js \u7248\u672C\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u9009\u62E9 Node.js 22.19 \u53CA\u4EE5\u4E0A\u7684 22.x \u7248\u672C\uFF0C\u6216 Node.js 24.x",
24866
+ "Remote Node.js is unsupported. Select Node.js 22.19 or later, except 23.x": "\u8FDC\u7A0B Node.js \u7248\u672C\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u9009\u62E9 Node.js 22.19 \u53CA\u4EE5\u4E0A\u7248\u672C\uFF0C\u4F46\u4E0D\u5305\u62EC 23.x",
24837
24867
  "npm installation failed. Check network access and global installation permissions": "npm \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u5168\u5C40\u5B89\u88C5\u6743\u9650",
24838
24868
  "Remote service configuration failed. Check Codex CLI and the remote desktop login": "\u8FDC\u7A0B\u670D\u52A1\u914D\u7F6E\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 Codex CLI \u4EE5\u53CA\u8FDC\u7A0B\u7535\u8111\u7684\u684C\u9762\u767B\u5F55\u72B6\u6001",
24839
24869
  "Remote service could not stop. Check the remote service before retrying": "\u8FDC\u7A0B\u670D\u52A1\u65E0\u6CD5\u505C\u6B62\uFF0C\u8BF7\u68C0\u67E5\u8FDC\u7A0B\u670D\u52A1\u540E\u91CD\u8BD5",
@@ -26008,6 +26038,7 @@ ${detail}` : ""}`
26008
26038
  loaded = true;
26009
26039
  show(value);
26010
26040
  }).catch(() => {
26041
+ loaded = true;
26011
26042
  status.textContent = messages.launchPathLoadError;
26012
26043
  }).finally(() => {
26013
26044
  busy = false;
@@ -27643,6 +27674,30 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
27643
27674
  };
27644
27675
  }
27645
27676
 
27677
+ // src/settings/session-import-sources.ts
27678
+ async function loadSessionImportSources(client, diagnostics, signal, refresh) {
27679
+ const { harnesses } = await client.listSessionImportSources();
27680
+ signal.throwIfAborted();
27681
+ if (!diagnostics || harnesses.length === 0) return harnesses;
27682
+ const hostId2 = client.hostId ?? "local";
27683
+ const readHost = () => diagnostics.snapshot().hosts.find((host2) => host2.hostId === hostId2);
27684
+ let host = readHost();
27685
+ const incomplete = () => !host || Boolean(host.directoryError) || harnesses.some(({ harnessId }) => {
27686
+ const status = host?.agents.find(({ agent }) => agent === harnessId)?.availability;
27687
+ return status === void 0 || status === "checking";
27688
+ });
27689
+ if (refresh || incomplete()) {
27690
+ await diagnostics.refresh(hostId2);
27691
+ signal.throwIfAborted();
27692
+ host = readHost();
27693
+ }
27694
+ if (incomplete()) throw new Error("Harness installation diagnostics are incomplete");
27695
+ const missing = new Set(
27696
+ host?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
27697
+ );
27698
+ return harnesses.filter(({ harnessId }) => !missing.has(harnessId));
27699
+ }
27700
+
27646
27701
  // src/settings/session-import-page.ts
27647
27702
  function shortSessionId(value) {
27648
27703
  return value.length <= 18 ? value : `${value.slice(0, 10)}\u2026${value.slice(-6)}`;
@@ -27712,7 +27767,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
27712
27767
  ...getDiagnostics()?.snapshot().hosts.map(({ hostId: hostId2 }) => hostId2) ?? [],
27713
27768
  ...current ? [current] : []
27714
27769
  ])
27715
- ];
27770
+ ].filter((hostId2) => hostId2 !== "durable");
27716
27771
  displayedHostId = current;
27717
27772
  const scrollLeft = hostOptions.scrollLeft;
27718
27773
  hostOptions.replaceChildren();
@@ -28056,10 +28111,14 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28056
28111
  content.append(list);
28057
28112
  updateImportActions();
28058
28113
  };
28059
- const load = () => {
28114
+ const load = (refreshDiagnostics = false) => {
28060
28115
  if (importingId !== null || context.signal.aborted) return;
28061
28116
  loadedClient = null;
28062
- const client = getClient(selectedHostId);
28117
+ let client = getClient(selectedHostId);
28118
+ if (client?.hostId === "durable") {
28119
+ selectedHostId = "local";
28120
+ client = getClient(selectedHostId);
28121
+ }
28063
28122
  renderHosts(client);
28064
28123
  listControls.setBusy(client !== null);
28065
28124
  refresh.disabled = client !== null;
@@ -28072,11 +28131,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28072
28131
  void context.runLatest(
28073
28132
  async (signal) => {
28074
28133
  if (!client) throw new RendererSessionImportUnavailableError();
28075
- const missing = new Set(
28076
- getDiagnostics()?.snapshot().hosts.find(({ hostId: hostId2 }) => hostId2 === (client.hostId ?? "local"))?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
28077
- );
28078
- const harnesses = (await client.listSessionImportSources()).harnesses.filter(
28079
- ({ harnessId }) => !missing.has(harnessId)
28134
+ const harnesses = await loadSessionImportSources(
28135
+ client,
28136
+ getDiagnostics(),
28137
+ signal,
28138
+ refreshDiagnostics
28080
28139
  );
28081
28140
  const selected = harnesses.find(({ harnessId }) => harnessId === requestedHarness)?.harnessId ?? harnesses[0]?.harnessId ?? null;
28082
28141
  if (signal.aborted) throw new Error("Session import selection changed");
@@ -28127,7 +28186,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
28127
28186
  load();
28128
28187
  hostButtons.find((button2) => button2.dataset.sessionImportHost === hostId2)?.focus();
28129
28188
  };
28130
- refresh.addEventListener("click", load);
28189
+ refresh.addEventListener("click", () => load(true));
28131
28190
  load();
28132
28191
  return void 0;
28133
28192
  }
@@ -16156,6 +16156,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16156
16156
  })
16157
16157
  });
16158
16158
 
16159
+ // ../shared-contracts/dist/background-activity.js
16160
+ var backgroundActivitySchema = external_exports.strictObject({
16161
+ id: external_exports.string().min(1),
16162
+ kind: external_exports.enum(["task", "monitor", "loop", "subagent"]),
16163
+ label: external_exports.string(),
16164
+ status: external_exports.enum(["running", "scheduled", "completed", "failed", "cancelled", "unknown"]),
16165
+ canStop: external_exports.boolean(),
16166
+ /** Existing detached command Item presented by Desktop's native process UI. */
16167
+ commandItemId: hostItemIdSchema.optional(),
16168
+ schedule: external_exports.string().optional(),
16169
+ nextRunAt: external_exports.string().datetime({ offset: true }).optional(),
16170
+ relatedActivityId: external_exports.string().optional(),
16171
+ threadId: hostThreadIdSchema.optional()
16172
+ });
16173
+ var backgroundActivityDetailSchema = external_exports.strictObject({
16174
+ activity: backgroundActivitySchema,
16175
+ output: external_exports.string(),
16176
+ truncated: external_exports.boolean()
16177
+ });
16178
+ var threadActivityParamsSchema = external_exports.strictObject({ threadId: hostThreadIdSchema });
16179
+ var threadActivityItemParamsSchema = threadActivityParamsSchema.extend({
16180
+ activityId: external_exports.string().min(1)
16181
+ });
16182
+ var threadActivityListResultSchema = external_exports.strictObject({
16183
+ supported: external_exports.boolean(),
16184
+ activities: external_exports.array(backgroundActivitySchema)
16185
+ });
16186
+ var threadActivityStopResultSchema = external_exports.strictObject({
16187
+ outcome: external_exports.enum(["stopped", "alreadyStopped", "notFound"])
16188
+ });
16189
+
16159
16190
  // ../shared-contracts/dist/index.js
16160
16191
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
16161
16192
 
@@ -16392,10 +16423,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16392
16423
  var RENDERER_NEW_THREAD_PREFERENCE_KEY = "codexhost.new-thread-preference.v1";
16393
16424
 
16394
16425
  // src/renderer-client-owned-voice.ts
16395
- var CLIENT_OWNED_VOICE_VERSION = "26.1027.30824";
16396
- var CLIENT_OWNED_VOICE_INITIAL_ASSET = "app-initial-60f141238751.js";
16397
- var CLIENT_OWNED_VOICE_SHARED_ASSET = "app-shared-7815d5a1a42a.js";
16398
- var CLIENT_OWNED_VOICE_OVERLAY_ASSET = "avatar-overlay-native-page-d9d400e751cd.js";
16426
+ var CLIENT_OWNED_VOICE_VERSION = "26.1027.61615";
16427
+ var CLIENT_OWNED_VOICE_INITIAL_ASSET = "app-initial-18b189e867e7.js";
16428
+ var CLIENT_OWNED_VOICE_SHARED_ASSET = "app-shared-601019a330d7.js";
16429
+ var CLIENT_OWNED_VOICE_OVERLAY_ASSET = "avatar-overlay-native-page-920d05377bbe.js";
16399
16430
  var CLIENT_OWNED_VOICE_ASSETS = [
16400
16431
  {
16401
16432
  platform: "darwin",
@@ -16403,6 +16434,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16403
16434
  initial: CLIENT_OWNED_VOICE_INITIAL_ASSET,
16404
16435
  shared: CLIENT_OWNED_VOICE_SHARED_ASSET,
16405
16436
  overlay: CLIENT_OWNED_VOICE_OVERLAY_ASSET,
16437
+ init: "Adr",
16438
+ fetch: "Odr",
16439
+ fetchFrom: "initial",
16440
+ bridge: "LRt",
16441
+ services: "Vct",
16442
+ responseError: "Pdr",
16443
+ responseErrorFrom: "initial",
16444
+ capabilityInit: "Ler",
16445
+ capabilityFamily: "Ier",
16446
+ inferenceGateFamily: "Vfr"
16447
+ },
16448
+ {
16449
+ platform: "darwin",
16450
+ version: "26.1027.30824",
16451
+ initial: "app-initial-60f141238751.js",
16452
+ shared: "app-shared-7815d5a1a42a.js",
16453
+ overlay: "avatar-overlay-native-page-d9d400e751cd.js",
16406
16454
  init: "Edr",
16407
16455
  fetch: "wdr",
16408
16456
  fetchFrom: "initial",
@@ -17308,10 +17356,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17308
17356
  const currentRole = manager.getStreamRole?.(threadId);
17309
17357
  if (isRecord4(currentRole) && currentRole.role === "follower")
17310
17358
  return originalSteer.apply(manager, args);
17311
- if (!Array.isArray(input) || input.length === 0 || input.some(
17312
- (item) => !isRecord4(item) || item.type !== "text" || typeof item.text !== "string"
17313
- ) || !input.some((item) => isRecord4(item) && typeof item.text === "string" && item.text.trim())) {
17314
- throw new Error("External steering requires non-empty text input");
17359
+ if (!Array.isArray(input) || input.length === 0 || input.some((item) => {
17360
+ if (!isRecord4(item)) return true;
17361
+ if (item.type === "text") return typeof item.text !== "string";
17362
+ if (item.type === "localImage") return typeof item.path !== "string" || !item.path;
17363
+ if (item.type === "image") return typeof item.url !== "string" || !item.url;
17364
+ return true;
17365
+ }) || !input.some(
17366
+ (item) => isRecord4(item) && (item.type !== "text" || typeof item.text === "string" && item.text.trim())
17367
+ )) {
17368
+ throw new Error("External steering requires non-empty text or image input");
17315
17369
  }
17316
17370
  if (toolOutput != null) throw new Error("External steering cannot replace a tool response");
17317
17371
  if (!isRecord4(restoreMessage) || !isRecord4(restoreMessage.context)) {